#ifndef _RGB_H_
#define _RGB_H_
#include <stdio.h>
#include <stdint.h>

typedef struct{
	uint8_t red;
	uint8_t green;
	uint8_t blue;
	uint8_t yellow;
	uint8_t white;
	uint8_t mode;
	uint8_t bright;	
	uint8_t pwm;
	uint16_t breath_fre;
}RBGCtrlStruct;

typedef enum{
	NOFLASH = 0,
	_1HZ = 10,
	_2HZ = 20,
	_5HZ = 50,
	_10HZ = 100,
	_15HZ = 150,
	_20HZ = 200,
}E_FLASH_HZ;//RGB flash hz

#define CONSTANT_OFF				0x00
#define CONSTANT_ON					0x11
#define BREATH_ON					0x01
#define FLASH_ON					0x10

extern uint16_t pwm_value,time_cnt;
extern uint8_t pwm_dir;

void SetRGBCtrlParam(uint8_t red,uint8_t green,uint8_t blue,uint8_t yellow,uint8_t white,uint8_t mode,uint8_t bright,uint16_t breath_fre);
void RGBCtrl(void);
void RGB_ctrl(uint8_t COLOR_R,uint8_t COLOR_G,uint8_t COLOR_B,uint8_t COLOR_Y,uint8_t COLOR_W,uint8_t Breath_Fre);

#endif


